#include "Game_page.h"
#include "IniProgram.h"
#include "MainPage.h"

Container *Game_Over_Page = nullptr;
Container *Game_Over_Page_ReStart_Btn = nullptr;
Container *Game_Over_Page_Back_Btn = nullptr;

void Display_Game_Over_Page()
{
    manager.set_top(Game_Over_Page);
}

void create_Game_Over_Page()
{
    Game_Over_Page = new Container(300, 300);
    Game_Over_Page->set_Visible();
    Game_Over_Page->set_background_image("./res/GameOver.bmp", true, 0x0000ff00);
    Game_Over_Page->set_pos(250, 100);
    Game_Over_Page->set_Event_Type(CLICK);
    manager.add(Game_Over_Page);

    Game_Over_Page_ReStart_Btn = new Container(Game_Over_Page, 177, 57);
    Game_Over_Page_ReStart_Btn->set_Visible();
    Game_Over_Page_ReStart_Btn->align(BOTTOM_CENTER, 0, -40);
    Game_Over_Page_ReStart_Btn->set_background_image("./res/reStart.bmp", true, 0x00ffffff);
    Game_Over_Page_ReStart_Btn->set_Event_Type(CLICK);
    Game_Over_Page_ReStart_Btn->set_Event(reStart);

    Game_Over_Page_Back_Btn = new Container(Game_Over_Page, 171, 60);
    Game_Over_Page_Back_Btn->set_Visible();
    Game_Over_Page_Back_Btn->align(BOTTOM_CENTER, 0, -100);
    Game_Over_Page_Back_Btn->set_background_image("./res/back_main_page.bmp", true, 0x00ffffff);
    Game_Over_Page_Back_Btn->set_Event_Type(CLICK);
    Game_Over_Page_Back_Btn->set_Event(Display_Main_Page);
}